CHAPTER 18 A Yes-or-No Proposition: Logistic Regression 255

Handling multiple predictors

in your logistic model

The data in Table 18-1 have only one predictor variable, but you may have several

predictors of a binary outcome. If the data in Table 18-1 were about humans, you

GETTING INTO THE NITTY-GRITTY OF

LOGISTIC REGRESSION

You don’t need to know all the theoretical and computation details for logistic regres-

sion because the software will do them for you. However, you should have a general

idea of what it is doing behind the scenes. The calculations are much more complicated

than those for ordinary straight-line or multivariate least-squares regression. In fact, it’s

impossible to write down a set of formulas that give the logistic regression coefficients

in terms of the observed X and Y values. The only way to obtain them is through a com-

plex iterative procedure that would not be practical to do manually.

Logistic regression determines the values of the regression coefficients that are most

consistent with the observed data using what’s called the maximum likelihood criterion.

The likelihood of any statistical model is the probability (based on the model) of obtain-

ing the values you observed in your data. There’s a likelihood value for each row in the

data set, and a total likelihood (L) for the entire data set. The likelihood value for each

data point is the predicted probability of getting the observed outcome result. For indi-

viduals who died (refer to Table 18-1), the likelihood is the probability of dying (Y) pre-

dicted by the logistic formula. For individuals who survived, the likelihood is the

predicted probability of not dying, which is 1

Y . The total likelihood (L) for the whole

set of individuals is the product of all the calculated likelihoods for each individual.

To find the values of the coefficients that maximize L, it is most practical to find the val-

ues that minimize the quantity 2 multiplied by the natural logarithm of L, which also called

the –2 log likelihood and abbreviated –2LL. Statisticians also call –2LL the deviance. The

closer the curve designated by the regression formula comes to the observed points,

the smaller this deviance value will be. The actual value of the deviance for a logistic

regression model doesn’t mean much by itself. It’s the difference in deviance between

two models you might be comparing that is important.

Once deviance is calculated, the final step is to identify the values of the coefficients that

will minimize the deviance of the observed Y values from the fitted logistic curve. This

may sound challenging, but statistical programs employ elegant and efficient ways to

minimize such a complicated function involving several variables, and uses these meth-

ods to obtain the coefficients.